#include<iostream>
using namespace std;

int combanitions(int n, int m);
int main(int argc, const char * argv[])
{
    int n = 20;
    int m = 10;
    int result = combanitions(n, m);
    cout << result <<endl;
    return 0;
}

int combanitions(int n, int m)
{
    double d_n = (double)n;
    double d_m = (double)m;
    double d_n_m = d_n - d_m;
    double d_result = 1;
    for(int i=m; i>0; i--)
    {
        d_result *= (d_n--)/(d_m--);
    }
    for(int i=n-m; i>0; i--)
    {
        d_result *= (d_n--)/(d_n_m--);
    }
    return (int)d_result;
}

